<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>应用中心</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="css/bootstrap.min.css?version=2.0.3">
    <link rel="stylesheet" href="css/bootstrap-table.css?version=2.0.3">
    <link rel="stylesheet" href="css/spop.min.css?version=2.0.3">
    <link rel="stylesheet" href="css/header.css?version=2.0.3"/>
    <link rel="stylesheet" href="css/application.css?version=2.0.3"/>
    <script type="text/javascript" src="js/jquery-3.3.1.min.js?version=2.0.3"></script>
    <script type="text/javascript" src="js/spop.min.js?version=2.0.3"></script>
    <script type="text/javascript" src="js/bistoury.js?version=2.0.3"></script>
    <script type="text/javascript" src="js/bootstrap.min.js?version=2.0.3"></script>
    <script type="text/javascript" src="js/bootstrap-table.js?version=2.0.3"></script>
    <script type="text/javascript" src="js/bootstrap-table-zh-CN.js"></script>
    <script type="text/javascript" src="js/jquery.cookie.js?version=2.0.3"></script>
    <script type="text/javascript" src="js/header.js?version=2.0.3"></script>
    <script type="text/javascript" src="js/spop.min.js?version=2.0.3"></script>
    <script type="text/javascript" src="js/bistoury.js?version=2.0.3"></script>
    <script type="text/javascript" src="js/application.js?version=2.0.3"></script>
</head>
<body>
<div class="col-md-12 header" id="header">

</div>
<div class="container">

    <div class="col-md-12 content" id="app-list-panel">
        <div class="col-md-10 col-md-offset-1">
            <div id="app-list-toolbar" style="margin-right: 12px;">
                <form class="form-inline">
                    <a class="btn btn-info" data-toggle="modal" id="app-add-btn">新增</a>
                </form>
            </div>
            <table id="app-list-table" class="table table-hover"></table>
        </div>
    </div>
    <div class="col-md-12 content" id="app-detail-panel" style="display: none">
        <div class="col-md-10 col-md-offset-1" style="height: calc(100% - 55px);">
            <div class="col-md-12" style="font-size: 18px;margin: 10px 0px;">
                <a class="back-app-list" style="cursor: pointer;">应用列表</a> &gt;&gt; 应用详情 &gt;&gt; <span id="app-detail-tail-app-code"></span>
            </div>
            <div style="height: 100%;">
                <ul class="nav nav-tabs" role="tablist" style="border: solid 1px #ddd;background-color: #eee;margin-top: 45px;">
                    <li role="presentation" class="active"><a href="#app-detail" id="app-detail-tab" aria-controls="app-detail" role="tab"
                                                              data-toggle="tab">应用详情</a>
                    </li>
                    <li role="presentation"><a href="#app-server-list" id="app-server-list-tab" aria-controls="app-server-list" role="tab"
                                               data-toggle="tab">服务器列表</a>
                    </li>
                </ul>
                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane active" id="app-detail">
                        <form class="form-horizontal col-md-10 col-md-offset-1" id="app-detail-form" style="margin-top:10px;">
                            <input id="app-detail-id" type="hidden" data-role="app-detail-value" name="appId" value="-1">
                            <div class="form-group">
                                <label for="app-detail-code" class="col-md-2 control-label">应用代号</label>
                                <div class="col-md-10">
                                    <input type="text" class="form-control" disabled data-role="app-detail-value" id="app-detail-code" name="code"
                                           placeholder="appCode">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="app-detail-name" class="col-md-2 control-label">应用名称</label>
                                <div class="col-md-10">
                                    <input type="text" class="form-control" data-role="app-detail-value" id="app-detail-name" name="name" placeholder="应用名称">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="app-detail-groupCode" class="col-md-2 control-label">组织代号</label>
                                <div class="col-md-10">
                                    <input type="text" class="form-control" data-role="app-detail-value" id="app-detail-groupCode" name="groupCode"
                                           placeholder="组织代号">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="app-detail-owner" class="col-md-2 control-label">应用负责人</label>
                                <div class="col-md-10">
                                    <textarea class="form-control" rows="3" data-role="app-detail-value" id="app-detail-owner" name="owner"
                                              placeholder="应用名称"></textarea>
                                    <p>用户名，每行一个</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="app-detail-status" class="col-md-2 control-label">状态</label>
                                <div class="col-md-10">
                                    <select class="form-control" data-role="app-detail-value" id="app-detail-status" name="status">
                                        <option value="0">未审核</option>
                                        <option value="1">审核通过</option>
                                        <option value="2">未通过</option>
                                        <option value="3">已废弃</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-md-10">
                                    <a class="btn btn-info" id="app-detail-save">保存</a>
                                    <a class="btn btn-info back-app-list">返回</a>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div role="tabpanel" class="tab-pane" id="app-server-list">
                        <div id="app-server-toolbar" style="margin-right: 12px;">
                            <form class="form-inline">
                                <a class="btn btn-info" id="app-server-add-btn">新增</a>
                            </form>
                        </div>
                        <table id="app-server-list-table" class="table table-hover"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="col-md-12">
    <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="app-server-modal" id="app-server-modal" style="margin-top: 70px;">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">服务器管理</h4>
                </div>
                <div class="modal-body col-md-12">
                    <form class="form-horizontal col-md-10 col-md-offset-1" id="app-server-form" style="margin-top:10px;">
                        <input id="app-server-id" type="hidden" data-role="app-server-value" name="serverId">
                        <div class="form-group">
                            <label for="app-server-ip" class="col-md-2 control-label">服务器IP</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" data-role="app-server-value" id="app-server-ip" name="ip"
                                       placeholder="服务器IP">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="app-server-host" class="col-md-2 control-label">主机名</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" data-role="app-server-value" id="app-server-host" name="host" placeholder="主机名">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="app-server-port" class="col-md-2 control-label">端口</label>
                            <div class="col-md-10">
                                <input type="number" class="form-control" data-role="app-server-value" id="app-server-port" name="port"
                                       placeholder="tomcat运行端口">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="app-server-logDir" class="col-md-2 control-label">应用日志目录</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" data-role="app-server-value" id="app-server-logDir" name="logDir" placeholder="应用日志目录">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="app-server-room" class="col-md-2 control-label">机房</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" data-role="app-server-value" id="app-server-room" name="room" placeholder="机房">
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" id="app-server-save-btn">保存</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>